<template>
    <div>
        <p v-if="false">{{a}}</p>
        <div class="two">
            <div class="three" v-for="(v,i) in data0" :key="i">
                <h4 class="h4">{{v.title}}</h4>
                <div v-for="(v,i) in v.const" :key="i" class="tiao">
                    <h5 class="p1">{{v.a}}</h5>
                    <p class="p2">{{v.b}}</p>

                </div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        name: "KF",
        data:function () {
            return{
                data0:"",
                data1:[
                    {
                        title:"各种 IDE",
                        const:[{
                            a:"Amexio Canvas Web Based Drag ac",
                            b:"Amexio Canvas is Drag and Drop Envitesting. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository.",
                        },{
                            a:"Amexio Canvas Web Based  Drop IDE by MetaMagic",
                            b:"Amexio Canvas is Drag and D live testing. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository.",
                        },{
                            a:"Amexio Canvas Web Based Dd Drop IDE by MetaMagic",
                            b:"Amexio Canvas is Drag and Drop Environment to create Fully Reor live testing. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository.",
                        },{
                            a:"Amexio Canvas Web",
                            b:"Amexio Canvas is Drag and live testing. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository.",
                        },{
                            a:"Amexio Canvas Web Based Drag and ",
                            b:"Amexio Cag. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository.",
                        },],
                    },  {
                        title:"各种 IDE",
                        const:[{
                            a:"Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
                            b:"Amexio Cand by the Canvas for live testing. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository."
                        }],
                    },  {
                        title:"各种 IDE",
                        const:[{
                            a:"Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
                            b:"Amexio Canvas is Drag and Drop Environment to create Fully Responsive Web and Smart Device HTML5/Angular Apps. Code will be auto generated and ho."
                        }],
                    },  {
                        title:"各种 IDE",
                        const:[{
                            a:"Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
                            b:"Amexio Canvas is Drag and Drop Environment to create Fully Responsive Web and Smart Device HTML5/Angular Apps. Code will be auto generated and hot"
                        }],
                    },
                ],

                data2:[{
                    title:"书籍",
                    const:[{
                        a:"Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
                        b:"Amexio Canvas is Drag and Drop Environment to create Fully Responsive Web and Smart Device HTML5/Angular Apps. Code will be auto generated and hot deployed by the Canvas for live testing. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository."
                    },{
                        a:"Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
                        b:"Amexio Canvas is Drag and Drop Environment to create Fully Responterial Design Theme support. Commit your code to GitHub public or private repository."
                    },{
                        a:"Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
                        b:"Amexio Canvas is  Canvas for live testing. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository."
                    },{
                        a:"Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
                        b:"Amexio Canvas is "
                    },{
                        a:"Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
                        b:"Amexio Canvas is Drag and Drop  testing. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository."
                    },],
                }],
                data3:[{
                    title:"社区作品",
                    const:[{
                        a:"Amexio Canvas Web Based  Drag and Drop Environment to creDrag and Drop IDE by MetaMagic",
                        b:"Amexio Canvas is Drag any Responsive Web and Smart Device HTML5/Angular Apps. Code will be auto generated and hot deployed by the Canvas for live testing. Out of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository."
                    },{
                        a:"Amexio Canvas Web Based DragE by MetaMagic",
                        b:"Amexio Canvas is Drag andl Design Theme support. Commit your code to GitHub public or private repository."
                    },{
                        a:"Amexio Canvas Web Based Drag aDE by MetaMagic",
                        b:"Amexio Canvas i0+ Material Design Theme support. Commit your code to GitHub public or private repository."
                    },{
                        a:"Amexio Canvas Web Based Drop IDE by MetaMagic",
                        b:"Amexio Cas  Canvas for l of the box 5nvas is "
                    },{
                        a:"Amexio Canvas Web Ba and Drop IDE by MetaMagic",
                        b:"Amexio Canvas is Drag ands  Canvas for l of the box 5s  Canvas for l of the box 5ut of the box 50+ Material Design Theme support. Commit your code to GitHub public or private repository."
                    },],
                }],

            }
        },

        beforeRouteEnter (to, from, next) {
            // 在渲染该组件的对应路由被 confirm 前调用
            // 不！能！获取组件实例 `this`
            // 因为当守卫执行前，组件实例还没被创建

            next(vm=>{
                vm.data0=vm.data1;
            });

        },
        beforeRouteUpdate (to, from, next) {
            // 在当前路由改变，但是该组件被复用时调用
            // 举例来说，对于一个带有动态参数的路径 /foo/:id，在 /foo/1 和 /foo/2 之间跳转的时候，
            // 由于会渲染同样的 Foo 组件，因此组件实例会被复用。而这个钩子就会在这个情况下被调用。
            // 可以访问组件实例 `this`
            console.log(to);
            let a=to.query.id;
                    if (a=="教育"){
                        this.data0=this.data2;
                    }else if(a=="开发"){
                        this.data0=this.data1;
                    }else if(a=="社区"){
                        this.data0=this.data3;
                    }
            next();
        },


    }
</script>

<style scoped>
    .two {
        width: 80%;
        /* background-color: brown; */
        margin: auto;
        /* border-bottom: darkgray 1px solid; */
        padding-bottom: 10px;
        margin-top: 10px;
        box-shadow: 1px 1px 1px #222222;
        transition: box-shadow .28s cubic-bezier(.4,0,.2,1);
        box-shadow: 0 1px 4px 0 rgba(10,16,20,.37);

    }
    .h4{
        background-color: #eceff1;;
        height: 50px;
        line-height: 50px;padding-left: 20px;

    }
    .p1{
        padding-left: 20px;
        margin: 5px;
        font-size: 17px;
    }
    .p2{
        color: rgb(56, 56, 56);
    }
    .tiao{
        padding-bottom: 10px;
        padding-top:10px;
        padding-left: 20px;
        background-color: rgb(255, 255, 255);
        transition: all 0.3s ease;


    }
    .tiao:hover{

        box-shadow: 0px 10px 10px 2px  #d1dcfd;
        position: relative;
        border-radius: 5px;
        z-index: 9;
        top: -1px;

    }
</style>